﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpCrack
{
	/// <summary>
	/// Contains helper methods for byte arrays.
	/// </summary>
	internal static class ByteArrayHelper
	{
		/// <summary>
		/// Compares two byte arrays.
		/// </summary>
		/// <param name="a"></param>
		/// <param name="b"></param>
		/// <returns></returns>
		public static bool CompareByteArrays(byte[] a, byte[] b)
		{
			if (a.Length != b.Length)
				return false;

			for (byte i = 0; i < a.Length; i++)
				if (a[i] != b[i])
					return false;

			return true;
		}
	}
}
